
package com.netease.xone.widget.msgbubble;

public class MyBox2d extends Box2dBase {

    public static final float SCALE_RATE = 4.0f; // 物理世界与屏幕环境缩放比列

    // 迭代值，迭代越大模拟越精确，但性能越低
    private float mTimeStep = 1f / 60f; // 模拟的频率
    private int velocityIterations = 8;
    private int positionIterations = 3;

    public void logic() {
        // --开始模拟物理世界--->>
        getWorld().step(mTimeStep, velocityIterations, positionIterations);
    }

    public void logic(float frame) {
        // --开始模拟物理世界--->>
        mTimeStep = frame;
        getWorld().step(mTimeStep, velocityIterations, positionIterations);
    }

}
